<html>
<!DOCTYPE html>
<head>
    <title>标签管理</title>
		<#include "/header.html">
</head>
<style>
.form-horizontal {
    width: 750px;
    padding-top: 40px;
    margin: 0 auto;
}
.btn-default {
    color: #444;
    background-color: #fafafa;
    border-color: #ddd;
    width: 75px;
}
</style>
<body>
<div id="sensorVue" v-cloak>
    <div style="width: 100%;float: left;" id="leftDiv">
        <div class="panel panel-default" id="ckDiv">
            <div class="panel-heading">串口连接</div>
            <div style="padding: 25px 0 20px 10px;">
                <div class="col-sm-1 control-label" style="text-align: right;line-height: 30px;">串口号</div>
                <div class="col-sm-2">
                    <select class="form-control" v-model="comName">
                        <option value="-1">-请选择-</option>
                        <option v-for="item in comList" :value="item">{{item}}</option>
                    </select>
                </div>
                
                <div class="col-sm-1 control-label" style="text-align: right;line-height: 30px;">波特率</div>
                <div class="col-sm-2">
                    <select class="form-control" v-model="baudrateName">
                        <option value="-1">-请选择-</option>
                        <option v-for="item in baudrateList" :value="item">{{item}}</option>
                    </select>
                </div>
                
                <div v-show="!ipConnect">
                    <input type="button" :class="['layui-btn',comConnect?'layui-btn-disabled':'layui-btn-normal']" value="连接" @click="connectCom(true)"/>
                    <input type="button" class="layui-btn layui-btn-normal" value="关闭" @click="connectCom(false)"/>
                    <input type="button" class="layui-btn layui-btn-normal" value="刷新串口" @click="getCom()"/>
                    <input type="button" class="layui-btn layui-btn-normal" value="打开socket" @click="patrolStart()"/>
                </div>
                <div v-show="ipConnect">
                    <input type="button" class="layui-btn layui-btn-disabled" value="连接"/>
                    <input type="button" class="layui-btn layui-btn-disabled" value="关闭"/>
                    <input type="button" class="layui-btn layui-btn-normal" value="刷新串口" @click="getCom()"/>
                    <input type="button" class="layui-btn layui-btn-normal" value="打开socket" @click="patrolStart()"/>
                </div>
            </div>
        </div>
        
    </div>
    <div style="width: 50%" id="leftDiv1">
    	<div id="record" style="width: 500px;height:240px;margin: auto; float: left;"></div>
        <div id="record2" style="width: 500px;height:240px;margin: auto;float: right;"></div>
    </div>

    <div class="panel panel-default" :style="'height:'+dataDivHeight+'px;margin-top:10px;float:left;width:100%;'">
        <div class="panel-heading">设备返回的数据</div>
        <div :style="'overflow:auto;padding: 10px;height:'+(dataDivHeight-50)+'px;'" id="contentDiv">

        </div>
    </div>
</div>
<script src="${request.contextPath}/statics/js/modules/sensor/sensor.js"></script>
</body>
<style>
#clientDiv div table th,#clientDiv div table td{
    text-align: center;
}
</style>
</html>
